﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

using System.Web.UI;
using System.Web.UI.WebControls;


public partial class Left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        #region 菜单列表

        HideMenuByUserGroup(Session["用户信息.岗位"].ToString());

        #endregion
    }

    /// <summary>
    /// 根据登陆人员角色, 选择功能菜单
    /// </summary>
    /// <param name="u_job"></param>
    private void HideMenuByUserGroup(string gang)
    {
        switch (gang)
        {
            case "总调调度":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_zddd()); break;
            case "国贸管理人员":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_gmgl()); break;
            case "运输处管理人员":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_ysgl()); break;
            case "总站领导":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_zzld()); break;
            case "总站调度":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_zzdd()); break;
            case "库管":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_kg()); break;
            case "统计":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_tj()); break;
            case "作业长":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_zyz()); break;
            case "生产主管":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_sczg()); break;
            case "科长":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_kz()); break;
            case "管理员":
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", hidemenu_gly()); break;
            default:
                break;
        }
    }

    /// <summary>
    /// [总调调度]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_zddd()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "sctj.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }

    /// <summary>
    /// [国贸管理人员]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_gmgl()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        scpt += "scrb.style.display=\"none\";";
        scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        //scpt += "kcjg.style.display=\"none\";";
        scpt += "ysjh.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "sctj.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }

    /// <summary>
    /// [运输处管理人员]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_ysgl()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        //scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "sctj.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }

    /// <summary>
    /// [总站领导]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_zzld()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        //scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        //scpt += "jbgl.style.display=\"none\";";
        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        //scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }

    /// <summary>
    /// [总站调度]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_zzdd()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        //scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        //scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }

    /// <summary>
    /// [库管]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_kg()
    {
        string scpt = "<script language='javascript'>";
        //scpt += "kf_jc.style.display=\"none\";";
        //scpt += "kf_zw.style.display=\"none\";";
        //scpt += "kf_fw.style.display=\"none\";";
        //scpt += "kf_gc.style.display=\"none\";";
        if (Session["用户信息.部门"].ToString() != "嘉东库")
        {
            
            scpt += "jddx.style.display=\"none\";";
        }
        else
        {
            scpt += "kf_kc.style.display=\"none\";";
        }
        
        //scpt += "kf_jj.style.display=\"none\";";
        //scpt += "kf_zy.style.display=\"none\";";
        //scpt += "kf_qr.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        scpt += "tj_zy.style.display=\"none\";";
        //scpt += "gpwf.style.display=\"none\";"; break;
        
        //scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        scpt += "scrb.style.display=\"none\";";
        scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        
        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";

        scpt += "kcqs.style.display=\"none\";";
        scpt += "sctj.style.display=\"none\";";
        //scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }
    private string hidemenu_tj()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        //scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        scpt += "scrb.style.display=\"none\";";
        scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "kcqs.style.display=\"none\";";
        scpt += "sctj.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";

        scpt += "user_adm.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }
    /// <summary>
    /// [作业长]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_zyz()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        //scpt += "zyz_jb.style.display=\"none\";";
        //scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";

        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        //scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }
    /// <summary>
    /// [生产主管]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_sczg()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        //scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        //scpt += "zg_hc.style.display=\"none\";";
        //scpt += "zg_lt.style.display=\"none\";";
        //scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        //scpt += "jbgl.style.display=\"none\";";

        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        //scpt += "zyqk.style.display=\"none\";";
        //scpt += "hcrjh.style.display=\"none\";";
        //scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }
    /// <summary>
    /// [科长]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_kz()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        //scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        //scpt += "scrb.style.display=\"none\";";
        //scpt += "zdhhb.style.display=\"none\";";
        //scpt += "jbgl.style.display=\"none\";";

        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "user_adm.style.display=\"none\";";
        //scpt += "kcqs.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        //scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }
    /// <summary>
    /// [管理员]功能菜单显示
    /// </summary>
    /// <returns></returns>
    private string hidemenu_gly()
    {
        string scpt = "<script language='javascript'>";
        scpt += "kf_jc.style.display=\"none\";";
        scpt += "kf_zw.style.display=\"none\";";
        scpt += "kf_fw.style.display=\"none\";";
        scpt += "kf_gc.style.display=\"none\";";
        scpt += "jddx.style.display=\"none\";";
        scpt += "kf_jj.style.display=\"none\";";
        scpt += "kf_zy.style.display=\"none\";";
        scpt += "kf_qr.style.display=\"none\";";
        scpt += "kf_kc.style.display=\"none\";";
        scpt += "zyz_jb.style.display=\"none\";";
        scpt += "tj_zy.style.display=\"none\";";
        scpt += "dd_fc.style.display=\"none\";";
        scpt += "dd_hb.style.display=\"none\";";
        scpt += "zg_hc.style.display=\"none\";";
        scpt += "zg_lt.style.display=\"none\";";
        scpt += "zg_sm.style.display=\"none\";";
        scpt += "scrb.style.display=\"none\";";
        scpt += "zdhhb.style.display=\"none\";";
        scpt += "jbgl.style.display=\"none\";";
        scpt += "ysjh.style.display=\"none\";";
        scpt += "kcjg.style.display=\"none\";";
        scpt += "kcqs.style.display=\"none\";";
        scpt += "sctj.style.display=\"none\";";
        scpt += "knccx.style.display=\"none\";";
        scpt += "zyqk.style.display=\"none\";";
        scpt += "hcrjh.style.display=\"none\";";
        scpt += "ltrjh.style.display=\"none\";";
        scpt += "gpwf.style.display=\"none\";";
        scpt += "</script>";
        return scpt;
    }
    
    
}
